home *** CD-ROM | disk | FTP | other *** search
- Power Bobs doc file. (22/11/1994) AmosZine version !
- ====================================================
-
- First I want to thank Andy Dobinson for his GREAT idea's !!!!!
-
-
-
- The extension is available for :
- Amos Classic : V1.3+
- AMOSPro : V1.12+
-
-
- the full version is availiable by simply sending a cheque or postal order
- to the following address....
-
-
- MAGICKINGHT/POWERSOFT productions
- 19 NORMAN ROAD
- ILFORD
- ESSEX
-
- prices..... 25 pounds + 2.50 p+p+insurance (printed manual)
-
- 20 pounds + 2.50 P+P+insurance (manual on disk)
-
- please make all cheques/po payable to G.SYMONS
-
-
-
-
-
- Installation of this demo
- -------------------------
-
- IMPORTANT - YOU MUST USE A COPY OF YOUR SYSTEM DISK
- JUST INCASE SOMETHING GOES WRONG
- YOU HAVE BEEN WARNED............ANDY
-
-
- FOR AMOS 1.3 users
- ------------------
-
- 1) First of all copy the file..... Amos_PowerBobs.Lib ......into your
- AMOS_SYTEM drawer on your COPY of your system disk
-
- 2) Boot up amos and run the...... CONFIG1_3.AMOS ........... program
-
- 3) select the ...LOAD DEFAULT CONFIGERATION... from the disc menu
-
- 4) click on .....SET LOADED EXTENSIONS.....from the set menu
-
- 5) click on line 13 of the list thats displayed and enter following
- exactly....
-
- AMOS_SYSTEM/Amos_PowerBobs.Lib
-
- 6) select quit
-
- 7) select.......... SAVE CONFIGERATION .........from the disc menu
-
- 8) dont forget to change .....AMOS1_3_NTSC and RAMOS1_3.ENV ...files
- using the same method as above
-
- 9) select QUIT and reboot
-
- AMOS PRO
- --------
-
- 1) copy the ...... AMOSPro_PowerBobs.Lib ..... into you APSystem directory
-
- 2) select set interpreter and then selectload default configeration
-
- 3) select set loaded extensions and click on line 13 and enter the
- line exactly
-
- AMOSPro_PowerBobs.Lib
-
- 4) select save default configeration and reboot....
-
-
- For BEST speed, programs are to compiled!!!
-
- Beware ! Several commands have changed read the whole docfile !!!
-
- New commands.
- -------------
-
- Main PowerBob commands.
- -----------------------
-
- Reserve Pbobs
-
- Reserve Pbobs AMOUNT
- Reserves a static memory list for AMOUNT of Pbobs.
- You can reserve a list for a maximum of 64 Pbobs.
- I can change this if you want more of them, but 64 seems to be
- enough for most applications...
-
- Bytes reserved : AMOUNT * 8
-
- Type of memory : Chip or Fast if available.
-
-
- Pbob Erase
-
- Pbob Erase
- Erase all Pbobs and their structure. This instruction is executed
- internally every time you run the AMOS/Pro program or when leaving
- AMOS/Pro.
-
-
- Pbob Dbuf
-
- Pbob Dbuf True/False
- If you are going to use Pbobs with the double buffering system, set it
- to True. Else set it to False.
- This command MUST preceed all following commands !
-
-
- Pbob Height
-
- Pbob Height NR,MAXIMUM_HEIGHT
- Reserves a PBOB_STRUCTURE for Pbob NR and initialises it with default
- values.
- If Pbob Dbuf is set to True, a second PBOB_STRUCTURE will be reserved
- for use with the double buffering system.
-
- Bytes reserved : PBOB_STRUCTURE Chip or Fast if available.
- MAXIMUM_HEIGHT * 36 Chip
- \--> 6 bytes for each line to save * 6 bitplanes.
- (See Pbob instruction for more details)
- If Pbob Dbuf is set to True, the amount of bytes reserved
- is doubled.
-
-
- Pbob
-
- Pbob NR,X,Y,IMAGE
- Does almost the same thing as the normal Bob command.
- The only differences are :
- 1) the maximum width of the IMAGE is 32 pixels wide.
- There are no restrictions on the height of the Pbob.
-
- 2) the height of the IMAGE that will be displayed may NOT exceed
- the maximum height for this Pbob.
- See the Pbob Height command.
-
- 3) the amount of colours of the IMAGE may NOT exceed the amount
- of screen colours where the Pbob will be displayed.
- Else a crash is certain!
- So if you open a screen with 4 colours, do not try to display a Pbob
- with 8 or more colours...
-
- 4) all parameters must be included.
- This will change in the future...
-
- 5) the Pbob numbering starts at 1, not 0 like the AMOS/Pro Bobs...
-
- 6) it is important to know that the coordinates for the Pbob's are
- measured from the top left-hand corner of the image.
- The current hot spot setting in not taken into account!
-
- 7) the Pbob commands have to be executed in the screen where they are
- to be displayed !
- This is because a part of the Clipping routine is done inside the
- Pbob command.
- Ex.:
- Repeat
- Screen 1
- Proc UPDATE_SCORE
- Screen 0
- Proc MOVE_BADDIES : Rem move the BAD_GUYS with Pbob NR,X,Y,IMAGE
- Proc MOVE_GOODIE : Rem move the GOOD_GUYS with Pbob NR,X,Y,IMAGE
- Proc UPDATE_BADDIES_AND_GOODIES : Rem Pbob Clear : Pbob Draw : Screen Swap : Wait Vbl
- Until AMOUNT_OF_GOODIES=0
-
- Pbob ARRAY_X,ARRAY_Y,ARRAY_IMAGE,START_BOB To END_BOB
- This is a superfast replacement for the original Pbob command.
- Normally you have to define all Pbob's whithin a loop like this :
-
- For I=START_BOB To END_BOB
- Pbob I,ARRAY_X(I),ARRAY_Y(I),ARRAY_IMAGE(I)
- Next I
-
- This loop can be replaced with one command !
-
- Pbob Varptr(ARRAY_X(0)),Varptr(ARRAY_Y(0)),Varptr(ARRAY_IMAGE(0)),START_BOB To END_BOB
-
- It has been carefully optimised to give the best speed possible!
- A few tests, normally done by the usual Pbob command, have been
- ommited.
- 1) It does not check if the Pbob IMAGE is wider than 32 pixels.
- 2) It does not check if the HEIGHT of the Pbob IMAGE exceeds the
- maximum height for this Pbob.
- 3) Also the lenght of the ARRAY's are not checked for !
-
- So I advise you to test your program in the usual manner and, if
- everything works fine, you can use the new version of the Pbob
- command.
-
-
- Pbob Off
-
- Pbob Off NR
- Does the same thing as the Amos Bob Off NR command...
-
- Pbob Off START To END
- Discard a range of Pbobs.
-
- Pbob Off
- Does the same thing as the Amos Bob Off command...
-
-
- Set Pbob
-
- Set Pbob NR,REPLACE_MODE,PLANEMASK
- Set Pbob drawing mode.
- There are two types of REPLACE_MODE :
- 1) a value of 0 will save and restore the background under your Pbob,
- this is the default value.
- 2) any other value will turn off the save and restore process.
-
- The PLANEMASK is a bit-map, defining which plane(s) of the Pbob will be
- copied onto the screen.
- If a bit is set to zero, this particular plane of the Pbob will not
- be copied onto the screen.
- Ex.: Set Pbob 1,0,%100001 --> copy plane 6 and 1 onto the screen.
- plane 654321
-
-
- Pbob Update
-
- Pbob Update
- Does the same thing as the Amos Bob Update command, except that
- the Logical and Physical Screens are not swapped.
- This allows a better control on the updating process if you are using
- multiple double buffered screens.
-
-
- Pbob Clear
-
- Pbob Clear START_BOB To END_BOB
- Clear a range of Pbobs by restoring the original background.
-
-
- Pbob Draw
-
- Pbob Draw START_BOB To END_BOB
- Draw a range of Pbobs on screen.
-
-
- Pdraw 25fps
-
- Pdraw 25fps
- Set the Pbob Clear and Pbob Draw command in 25 frames per second
- mode.
- When you run your program, it is allways reset to 50 frames per second!
- Beware, this mode does not influence the Pbob Update command!
-
- In ProjectX and Alien Breed and quite a lot of other games, the main
- Sprite etc., is updated at 50 frames per second, but the Bobs are only
- updated at 25 frames per second.
- So the program looks like this:
-
- DO
- `
- A=1-A : rem a simple toggle 1st frame = 1, next frame =0 etc
- `
- `
- READ JOYSTICK AND STUFF EVERY FRAME
- `
- `
- If A=1
- CLEAR ALL BOBS
- `
- Pbob Clear 1 To 20
-
- CALCULATE NEW POSTIONS FOR BOBS 11 TO 20
- `
- Pbob DRAW 11 TO 20
- ETC.......
- `
- Else
- `
- CALCALCULATE NEW POSTIONS FOR BOBS 1 TO 10
- `
- Pbob Draw 1 TO 10
- ETC.....
- '
- Screen Swap
- '
- End If
- 'UPDATE MAIN SPRITE EVERY FRAME
- Sprite 0,X,Y,3
- Wait Vbl
- Loop
-
- As you can see, Pbobs 11 to 20 are drawn in the first frame.
- The next frame, Pbobs 1 to 10 are drawn and screen swapped into view.
- But the joystick reading and anything else are updated every frame!
-
-
- Pswap Clear
- In the old Pbob Clear command the background buffer adresses where
- swapped inside the Pbob Clear command.
- Normally you used to do :
- Pbob Clear
- Screen Swap
- Pbob Clear
-
- The new way is :
- Pbob Clear START_BOB To END_BOB
- Screen Swap
- Pswap Clear
- Pbob Clear START_BOB To END_BOB
-
-
- PowerBob Amal support.
- ----------------------
-
- Pchannel To Pbob
-
- Pchannel To Pbob AMAL_CHANNEL To PBOB_NR
- Assigns Pbob PBOB_NR to Channel AMAL_CHANNEL.
- As normal with Amal programs, the X/Y and A variables define the
- Pbob X/Y coordinates and it's image.
- It is important to assign the channel(s) to the Pbob(s) after the
- Amal CHAN_NR,ANIM$
-
-
- Psync Pbob
-
- Psync Pbob START_BOB To END_BOB
- It does the same thing as the Amos/Pro Synchro command, but as an
- additional bonus a range of Pbobs can be updated, this is :
- the new X/Y and A values are transferred to the Pbobs.
- It whas also necessary to include a range to be compatible with the
- new 25 frames per second mode.
- You still have to call the Pbob Update or the Pbob Clear/Draw duo
- to update your Pbobs on screen.
- Beware ! The Psync Pbob command has to be executed in the screen
- where the Pbobs are to be displayed !
- This is because a part of the Clipping routine is done inside the
- Psync Pbob command.
-
-
- Psync Every
-
- Psync Every FRAME_COUNT
- Normally the Psync Pbob transfers the X/Y and A values every time the
- Psync Pbob command is called, this is the default mode.
- In some occasions it is preferable to update these values at a slower
- rate. The FRAME_COUNT delay ranges from 1 to 32767.
-
-
- PowerBob functions.
- -------------------
-
- =I Pbob()
-
- IMAGE=I Pbob(NR)
- Return the actual image for Pbob NR.
-
-
- =X Pbob()
-
- X=X Pbob(NR)
- Return X coordinate of Pbob NR.
-
-
- =Y Pbob()
-
- Y=Pbob Y(NR)
- Return Y coordinate of Pbob NR.
-
-
- =Pbob Fastcol()
-
- RESULT=Pbob Fastcol(BOB,STARTBOB To ENDBOB)
- Does the same thing as the Bob Col function except that I use
- coordinate checking.
- This method is much faster than using the BLITTER to check if a
- collision has occured, but is not so accurate.
- It can be used even if the BOB's have no mask.
- A Pbob Finecol function, which uses the BLITTER, will be available soon.
-
- RESULT=Pbob Fastcol(BOB To OTHER_BOB)
- This one is handy if you want to detect a collision between two BOB's.
- It does the same thing as Pbob Fastcol(BOB,OTHER_BOB To OTHER_BOB) but
- is a bit faster.
- Since you are only checking for collision between one BOB and another BOB,
- the flag in the collision array is not set.
- This means that the Pfast Col() function is useless in this case.
-
-
- =Pbobsprite Fastcol()
-
- RESULT=Pbobsprite Fastcol(BOB,STARTSPRITE To ENDSPRITE)
- Does the same thing as the Bobsprite Col function except that I use
- coordinate checking.
- This method is much faster than using the BLITTER to check if a
- collision has occured, but is not so accurate.
- It can be used even if the BOB's have no mask.
- A Pbobsprite Finecol function, which uses the BLITTER, will be available
- soon.
-
- RESULT=Pbobsprite Fastcol(BOB To SPRITE)
- This one is handy if you want to detect a collision between a BOB and
- one SPRITE.
- It does the same thing as Pbobsprite Fastcol(BOB,SPRITE To SPRITE) but
- is a bit faster.
- Since you are only checking for collision between one BOB and another SPRITE,
- the flag in the collision array is not set.
- This means that the Pfast Col() function is useless in this case.
-
-
- =Pfast Col()
-
- NR=Pfast Col(BOB_NR or SPRITE_NR)
- Does the same thing as the Col(BOB_NR or SPRITE_NR) function in AMOS/Pro.
- To be used when doing FAST collision detection.
-
-
-
- Main PowerSprite commands.
- --------------------------
-
- Convert Sprites
-
- Convert Sprites BANKNR
- Convert all Sprites in bank BANKNR to special hardware format.
- As you know, Bob's and Sprites share the same format in memory.
- Normally, when displaying a Sprite, it has to be converted into the
- special hardware format (interleaved bitplane format), before it
- can be displayed by the Sprite DMA-channels.
- The Psprite commands skip this conversion giving an enormous speed-gain!
- It is best to keep you Sprites and Bobs into separate banks, because
- this command will convert all Bobs/Sprites in the bank, wasting a lot
- of your precious memory !
- At this moment the conversion works fine for 4 coloured Sprites
- that are 16 pixels wide, any height is allowed.
-
-
- Psprite Max
-
- Psprite Max AMOUNT
- Set the maximum amount of Psprites that will be used.
- A maximum of 128 Psprites is allowed !
-
-
- Psprite NR,X,Y,IMAGE
- Does the same thing as the AMOS/Pro command.
- All parameters must be given !
-
- Psprite Off
-
- Psprite Off NR
- Does the same thing as the Amos/Pro Sprite Off NR command...
-
- Psprite Off START To END
- Discard a range of Psprites.
-
- Psprite Off
- Does the same thing as the Amos/Pro Sprite Off command...
-
-
- Psprite Update
-
- Psprite Update
- This is a very powerfull updating command.
- First it checks if the maximum amount of Psprites <= 8, if so
- the Psprite images are copied directly to their corresponding
- sprite DMA-channels.
-
- If the maximum amount of Psprites >8 and the number of actually
- defined sprites with the Psprite command is <=8, the Psprite images
- are copied directly to the sprite DMA-channels without sorting.
-
- In any other case the Psprites are first sorted on their Y-coordinates.
- Then every Psprite is checked if it can be fitted in a particular
- sprite DMA-channel.
- It is possible to have 128 Psprites on screen using only 1 sprite
- DMA-channel! (ever seen those demos with super smooth starfields)
-
-
- PowerSprite functions.
- ----------------------
-
- =X Psprite()
-
- HARD_XCOOR=X Psprite(NR)
- Returns the actual hardware X coordinate for Psprite NR
-
-
- =Y Psprite()
-
- HARD_YCOOR=Y Psprite(NR)
- Returns the actual hardware Y coordinate for Psprite NR
-
-
-
- Additional commands.
- ====================
-
- =Xscr Sprite()
-
- XSCREEN_COORD=Xscr Sprite(NR)
- This is a full replacement for XSCREEN_COORD=X Screen(X Sprite(NR)).
-
-
- =Yscr Sprite()
-
- YSCREEN_COORD=Yscr Sprite(NR)
- This is a full replacement for YSCREEN_COORD=Y Screen(Y Sprite(NR)).
-
-
- =Xscr Mouse
-
- XSCREEN_COORD=Xscr Mouse
- This is a full replacement for XSCREEN_COORD=X Screen(X Mouse).
-
-
- =Yscr Mouse
-
- YSCREEN_COORD=Yscr Mouse
- This is a full replacement for YSCREEN_COORD=Y Screen(Y Mouse).
-
-
- Additional information.
- -----------------------
-
- Since this extension is still growing and changing, I advise you to
- save all your programs in ASCII format with separate graphic banks.
- You are warned !!!
-
-
- The Pbob Update command :
- The updating process is divided into 3 stages.
- 1) Background replacement.
-
- 2) Background saving.
- This is only done if the X/Y coordinates or the Pbob IMAGE width/height
- have changed since the last update.
-
- 3) Image drawing.
- This is performed every time for all Pbob's.
-
- The Pbob Clear command :
- The background is replaced every time for all Pbob's from their
- safe places.
-
- The Pbob Draw command :
- The drawing process is divided into 2 stages.
- 1) Define the area where the Pbob's will be displayed and
- copy this area to a safe place.
- 2) Draw the images for all Pbob's.
-
- So the Pbob Clear/Draw should be used when a lot of changes are done
- onto the screen.
- Ex.:
- Do
- Pbob Clear START_BOB To END_BOB
- 'do all other drawing stuff...
- Pbob Draw START_BOB To END_BOB
- Loop
-
-
- Problem solving :
- -----------------
-
- The Pbob's are scrambled on screen :
- Be sure that the following commands are executed on the screen you want
- to display them.
- 1) Pbob NR,X,Y,IMAGE
- 2) the Pbob Clear and Pbob Draw duo.
- 3) the Pbob Update command.
- 4) the Psync Pbob command.
-
- The Pbob's disappear at certain X/Y coordinates :
- Be sure to execute the Pbob commands on the screen you will display them.
- A part of the Clipping routine is done by the Pbob/Psync Pbob command!
-
- The Pbob's don't appear on screen :
- Are you using a double buffered screen, and you haven't set the
- Pbob Dbuf flag to True ?
-
- The Pbob's leave traces on screen :
- Are you using a single buffered screen, and you haven't set the
- Pbob Dbuf flag to False ?
-
- The Pbob's don't appear on a double buffered screen, even when the
- Pbob Dbuf flag is set to True :
- Have you set the Autoback system to 0 or 1 ?
- The Pbob's are only displayed on the Logical screen, so a
- Screen Swap has to be put somewhere in your program.
- Remember ! The Pbob Update command does NOT swap the Logical and
- Physical screens.
-
- Your program crashes when using the Pbob system :
- Put your program on disk and send it to the publisher for
- investigation of the problem.
-
-
- Future commands/enhancements.
- -----------------------------
-
-
- RESULT=Pbob Finecol(BOB,START_BOB To ENDBOB)
- Do collision detection with the BLITTER.
-
- RESULT=Pbob Finecol(BOB To OTHER_BOB)
- Do collision detection with the BLITTER.
-
- NR=Pfine Col(BOB_NR)
- Does the same thing as the Col(BOB_NR) function in AMOS/Pro.
- To be used when doing FINE collision detection.
-
-
-